-module(test).
-export([start/0, demo/0]).

start() ->
    iconv:start().

demo() ->
    Str = "这是一条测试数据",
    ResGB2312 = iconv:convert("UTF8", "GB2312", Str),
    ResUTF8 = iconv:convert("GB2312", "UTF8", ResGB2312),
    io:format("UTF8: ~w~n", [Str]),
    io:format("GB2312: ~w~n", [ResGB2312]),
    io:format("UTF8: ~w~n", [ResUTF8]).
    
